import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // }
    {
      path: "/",
      redirect: "login"
    },
    {
      path: "/login",
      name: "Login",
      component: () =>
        import(/* webpackChunkName:"login" */ "../views/login/Login.vue")
    },
    {
      path: "/register",
      name: "Register",
      component: () =>
        import(/* webpackChunkName:"register" */ "../views/login/Register.vue")
    },
    {
      path: "/user",
      name: "User",
      component: () =>
        import(/* webpackChunkName:"user" */ "../views/User.vue")
    },
  ],
  mode: 'history'
});
